Conversation
florentianayuwono
approved these changes
Mar 24, 2026
swetha1654
approved these changes
Mar 25, 2026
… error The typeshed stubs for logging.basicConfig don't include the encoding parameter in the handlers overload. The encoding is already set on the WatchedFileHandler itself (line 22), so passing it again to basicConfig is redundant and causes a mypy call-overload error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The PR added _setup_proxy_environment() in _on_image_relation_joined. The test was using a plain MagicMock() for BuilderConfig.from_charm, causing build_config.proxy to be a MagicMock. When passed to _setup_proxy_environment, assigning it to os.environ raises TypeError. Fix: return a mock config with proxy=None so the proxy setup is skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Observer stored self.charm typed as ops.CharmBase, but called _setup_proxy_environment which is defined on GithubRunnerImageBuilderCharm. Use TYPE_CHECKING to import the concrete type and annotate the constructor parameter correctly, resolving the attr-defined mypy error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onment The method is called from image.Observer (outside the charm class), so it should be public. Renamed from _setup_proxy_environment to setup_proxy_environment to avoid the pylint protected-access warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable spec:
Overview
Fix image-relation-joined event hook by setting up proxy
Rationale
Proxy is required to connect to OpenStack
Juju Events Changes
Module Changes
Library Changes
Checklist
urgent,trivial,senior-review-required,documentation)app/pyproject.toml